import request from '@/utils/request'

// 查看资产
export function listData(query) {
  return request({
    url: '/admin/data/data/',
    method: 'get',
    params: query
  })
}

// 添加资产
export function addData(data) {
  return request({
    url: '/admin/data/data/',
    method: 'post',
    data: data
  })
}

// 修改资产
export function updateData(data) {
    return request({
        url: '/admin/data/data/',
        method: 'put',
        data: data
      })
}


// 删除资产
export function delData(query) {
  return request({
    url: '/admin/data/data/',
    method: 'delete',
    params: query
  })
}

//查看变更历史
export function listRecdata(query) {
    return request({
      url: '/admin/data/recdata/',
      method: 'get',
      params: query
    })
  }


//搜索资产
export function searchdata(query) {
  return request({
    url: '/admin/data/search/',
    method: 'post',
    data: query
  })
}
